<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main" />
    <g:set var="entityName" value="${message(code: 'address.label', default: 'Address')}" />
    <title>地址：${address.address}</title>
</head>

<body class="fixed-navbar fixed-sidebar">
    <div class="small-header">
        <div class="hpanel">
            <div class="panel-body">
                <div id="hbreadcrumb" class="pull-right">
                    <ol class="hbreadcrumb breadcrumb">
                        <li>Next CRM</li>
                        <li>
                            <!-- <g:link controller="address" action="index">单位地址</g:link> -->
                            单位地址
                        </li>
                        <li class="active">
                            <span>${this.address?.address}</span>
                        </li>
                    </ol>
                </div>

                <h2 class="font-light m-b-xs">
                单位名称: ${this.address.address}
            </h2>
            </div>
        </div>
    </div>

    <div class="content animate-panel">
        <div class="row">
            <div class="hpanel hblue">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <g:link class="btn btn-info btn-xs" action="edit" resource="${this.address}"><i class="fa fa-edit"></i>编辑</g:link>
                        <g:form resource="${this.address}" method="DELETE" style="display: inline-block">
                            <button class="deleteBtn btn btn-danger btn-xs" type="button">
                                <i class="fa fa-trash-o"></i>删除
                            </button>
                        </g:form>
                    </div>
                    地址详情
                </div>

                <div class="panel-body form-horizontal">
                    <div class="form-group row">
                        <label class="col-md-2 control-label">地址类型</label>

                        <div class="col-md-3">
                            <p class="form-control-static">
                                ${this.address?.type?.name}
                            </p>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label">地址</label>

                        <div class="col-md-3">
                            <p class="form-control-static">
                                ${this.address?.address}
                            </p>
                        </div>
                        <label class="col-md-2 control-label">邮编</label>

                        <div class="col-md-3">
                            <p class="form-control-static">
                                ${this.address?.zip}
                            </p>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label">国家</label>

                        <div class="col-md-3">
                            <p class="form-control-static">
                                ${this.address?.country?.name}
                            </p>

                        </div>
                        <label class="col-md-2 control-label">省份</label>

                        <div class="col-md-3">
                            <p class="form-control-static">
                                ${this.address?.province?.name}
                            </p>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label">城市</label>

                        <div class="col-md-3">
                            <p class="form-control-static">
                                ${this.address?.city?.name}
                            </p>
                        </div>

                        <label class="col-md-2 control-label">区域</label>

                        <div class="col-md-3">
                            <p class="form-control-static">
                                ${this.address?.district?.name}
                            </p>
                        </div>
                    </div>

                    <g:if test="${this.address.activity}">

                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-2 control-label">活动</label>
                            <div class="col-md-3">
                                <p class="form-control-static">
                                    <g:link controller="activity" action="show" resource="${this.address?.activity}">${this.address?.activity}</g:link>
                                </p>

                            </div>
                        </div>
                    </g:if>

                    <g:if test="${this.address.account}">

                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-2 control-label">客户</label>
                            <div class="col-md-3">
                                <p class="form-control-static">
                                    <g:link controller="account" action="show" resource="${this.address?.account}">${this.address?.account}</g:link>
                                </p>

                            </div>
                        </div>
                    </g:if>

                    <g:if test="${this.address.contact}">

                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-2 control-label">联系人</label>
                            <div class="col-md-3">
                                <p class="form-control-static">
                                    <g:link controller="contact" action="show" resource="${this.address?.contact}">${this.address?.contact}</g:link>
                                </p>

                            </div>
                        </div>
                    </g:if>

                    <g:if test="${this.address.campaign}">

                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-2 control-label">市场活动</label>
                            <div class="col-md-3">
                                <p class="form-control-static">
                                    <g:link controller="campaign" action="show" resource="${this.address?.campaign}">${this.address?.campaign}</g:link>
                                </p>

                            </div>
                        </div>
                    </g:if>

                    <g:if test="${this.address.opportunity}">

                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-2 control-label">商机</label>
                            <div class="col-md-3">
                                <p class="form-control-static">
                                    <g:link controller="opportunity" action="show" resource="${this.address?.opportunity}">${this.address?.opportunity}</g:link>
                                </p>

                            </div>
                        </div>
                    </g:if>

                    <g:if test="${this.address.lead}">

                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-2 control-label">线索</label>
                            <div class="col-md-3">
                                <p class="form-control-static"><g:link controller="lead" action="show" resource="${this.address?.lead}">${this.address?.lead}</g:link></p>
                            </div>
                        </div>
                    </g:if>

                </div>
            </div>
        </div>
    </div>
</body>

</html>